<?php
defined('_JEXEC') or die( 'Restricted access' );

	// echo "<pre>";
// print_r($params);
// echo "</pre>";


$style 						= $params['style'];
$yahooimage 			= $params['yahooimage'];
$customimage 			= @$params['customimage'];
$align 						= @$params['align'];


$strYahooId=$params['arrayYahooId'];
$strTest=$params['arrayTest'];

$arrayYahooId = explode('\n', $strYahooId);
$arrayText = explode('\n', $strTest);


$image_online 		= $params['yahooimage'];
// , BASE_URL . "/modules/chat/chat/customonline0.gif" );
$image_offline 		= $params['image_offline'];
// , BASE_URL . "/modules/chat/chat/customonffine0.gif" );
// echo "<br/>";
echo "<div  style=\"clear: both; padding-bottom:2px; padding-top: 2px;  \"></div>";
if(!$style || $style==0 || $style=="0") {
  for($i = 0; $i < count($arrayYahooId); $i++)
{
	echo '<div style="text-align: center;" ><a href="ymsgr:sendIM?'.$arrayYahooId[$i].'"><img alt="ho-tro-web-dung-san-'.$arrayYahooId[$i].'"  src="http://opi.yahoo.com/online?u='.$arrayYahooId[$i].'&m=g&t='.$yahooimage.'"  border="0" /></a></div>';
	if($arrayText[$i]=="")
	echo '<br>';
	else
	echo '<div  style="padding-bottom:10px; padding-top: 3px; text-align: center;">'.$arrayText[$i].'</div>';
}
} else {
for($i = 0; $i < count($arrayYahooId); $i++)
{

	$online = true;
	echo '<div  align="'.$align.'"><a href="ymsgr:sendIM?'.$arrayYahooId[$i].'">';
	if($arrayText[$i]=="")
	echo '<br>';
	else
	echo '<div align="center">'.$arrayText[$i].'</div>';
	if($style=="1") {
		if($online) {
			echo '<img alt="ho-tro-web-dung-san"   src="'.BASE_URL.'/mods/chat/chat/customonline'.$customimage.'.gif" border="0" />';
		} else {
			echo '<img alt="ho-tro-web-dung-san"   src="'.BASE_URL.'/mods/chat/chat/customoffline'.$customimage.'.gif" border="0" />';
		}
	} else {
		if($online) {
			echo '<img alt="ho-tro-web-dung-san"  src="'.$image_online.'" border="0" />';
		} else {
			echo '<img alt="ho-tro-web-dung-san"  src="'.$image_offline.'" border="0" />';
		}
	}
	echo '</a></div>';
}
}
// echo "<br/>";
/*so dien thoai*/

$sodt=$params['arrayTell'];
$arraysodt = explode('\n', $sodt);
/*
echo "<pre>";
print_r($arraysodt);
echo "</pre>";

foreach ($arraysodt AS $dt)
{
	echo $dt;
	echo '<div align="center" style="height:20px"><span style="color:#ffffff; font-weight: bold;" >'.$dt.'</span></div>';
}
*/
for($i = 0; $i < count($arraysodt); $i++)
{
	echo '<div  style="padding-bottom:3px; text-align: center;"><span style="font-weight: bold;" >'.$arraysodt[$i].'</span></div>';
	//echo $arraysodt[$i]."<br/>";
}

?>